#include "appCommunicate.h"
#include "oledDriver.h"
#include "nrf24l01.h"

/**
 * @brief 接收来自遥控的数据
*/
void RecvMsgFromRemote(uint8_t *recvBuf)
{
    if (Sw_ReadIRQ() == 0) {
        Sw_RecvData(recvBuf);
    }
    OLED_ShowHexNum(1,1,recvBuf[0],2);
    OLED_ShowHexNum(1,4,recvBuf[1],2);
    OLED_ShowHexNum(2,1,recvBuf[2],2);
    OLED_ShowHexNum(2,4,recvBuf[3],2);
    OLED_ShowHexNum(3,1,recvBuf[4],2);
    OLED_ShowHexNum(3,4,recvBuf[5],2);
}

/**
 * @brief 发送数据到遥控
*/
void SendMsgToRemote(uint8_t *sendBuf)
{
    Sw_SendData(sendBuf);
}
